XVII. Advanced Commands

This chapter discusses advanced tools that you can use to administer the SpinServer. The tools in this section require that you access the SpinServer with a Linux shell. The tools discussed here are not accessible via the SpinManager CLI or GUI. Use these tools only if you are familiar with Linux/UNIX shells.

The following advanced commands are available:

  • buildexports

  • spinauthcli

  • spinsh

  • vfsdump

  • vfsrestore

Table of Contents
buildexports — Use the buildexports command to read one or more export file lists and create or update export lists based on the specifications located in the file.
spinauthcli — Use the spinauthcli command from a client to use SpinAuth to authenticate securely to a SpinServer over NFS.
spinsh — Use the spinsh command to run one or more SpinManager CLI commands from a shell.
vfsdump — Use the vfsdump command to dump the contents of a VFS to standard output or a specified output file.
vfsrestore — Use the vfsrestore command to restore the contents of a VFS from a VFS dump.

buildexports

Name

buildexports -- Use the buildexports command to read one or more export file lists and create or update export lists based on the specifications located in the file.

Synopsis

/usr/sbin/buildexports [-s server] [-hvV] [-g netgroup_file_name ...] rule_set_file_name...

Description

The buildexports command reads one or more export file lists and creates or updates export lists based on the descriptions located in the file. See SpinAccess Export Rules Commands for a listing of CLI commands that can be used to work with export rule sets.

Options

[-s server]

This specifies the server on which the command is to run. The default is localhost.

[-h]

This displays command usage.

[-v]

This specifies verbose output.

[-V]

This displays the version of the program.

[-g netgroup_file_name]

This specifies the name of a group definition file. The file must be in the standard Solaris netgroup(4) format, which is the same format displayed by the ypcat -k netgroup command. If groups are not included in the rule set file specified by the rule_set_file_name parameter, you do not need to use this option. You can specify multiple -g netgroup_file_name parameters to use multiple netgroup files.

rule_set_file_name

This specifies the name of a text file that contains export-list descriptions. You can specify multiple arguments to use multiple rule-set files. Blank lines and white space in the file are ignored, and the pound character (#) indicates a comment to the end of the current line. The file must contain lines of the following two forms:

     ruleset name # Begins a rule set definition for name
     rule host_or_group mask_bits RO_rule RW_rule # Adds a rule

In the rule line, the rule is specified as follows:

The following is an example of a rule-set file:

     ruleset englab-only
     rule @englab 16 any any  # read-write for hosts in @englab
     rule 0.0.0.0 0 any never # rest of world read-only

     ruleset webserver-config
     rule webmaster-pc.it.example.com 32 any nfs-kerberos
     # no access for anyone else

Example

The following example creates or updates export rule sets contained in two rule-set files named /tmp/englab.rules and /tmp/external.rules. No group definition files are specified.

# /usr/sbin/buildexports /tmp/englab.rules /tmp/external.rules

spinauthcli

Name

spinauthcli -- Use the spinauthcli command from a client to use SpinAuth to authenticate securely to a SpinServer over NFS.

Synopsis

spinauthcli [-h] [-i] [-d] [-q] spinserver_name

Description

The spinauthcli command sets up SpinAuth credentials between an NFS client and a SpinServer. The command is run on the client, not on the SpinServer. The command must be compiled for your client platform. Network Appliance can supply you with precompiled spinauthcli binaries for your client platform upon request; contact your Network Appliance representative for more information. See the Administration Guide for additional details about using SpinAuth.

Options

[-h]

This displays help information for the command.

[-i]

This queries the credential's lifetime.

[-d]

This destroys the credential.

[-q]

This specifies that the command runs in quiet mode.

Example

The following example sets up SpinAuth credentials for a client on a SpinServer named Server1.data.example.com

% spinauthcli Server1.data.example.com

spinsh

Name

spinsh -- Use the spinsh command to run one or more SpinManager CLI commands from a shell.

Synopsis

/bin/spinsh [-e] [h] [-t] [-v] [-y] [-c command]

Description

The spinsh command runs one or more SpinManager CLI commands in a shell. It can be used in shell scripts to perform SpinManager operations.

Options

[-e]

This specifies that the spinsh command abort if any of the commands issued under it fail. This option is used only in batch mode.

[-h]

This displays command usage.

[-t]

This displays the execution time, in seconds, of the command after the command is run.

[-v]

This displays all fields in show commands.

[-y]

This disables any confirmation messages associated with commands that are run under the spinsh command.

-c command

This specifies a single CLI command to run, after which the spinsh command exits.

Example

The following example runs the CLI system software show command, then exits.

# /bin/spinsh -c system software show

vfsdump

Name

vfsdump -- Use the vfsdump command to dump the contents of a VFS to standard output or a specified output file.

Synopsis

/sbin/vfsdump [-h] [-s spinserver] [-l previous_label] [-n] [-c] [-t timeout_value] [-o [output_file]] VFS_name

Description

The vfsdump command writes the contents of a VFS to standard output or a specified output file.

Options

[-h]

This displays help information for the command.

[-s spinserver]

This specifies the name or IP address of a SpinServer in the cluster in which the source VFS is located. The default value is 127.0.0.1.

[-l previous_label]

This specifies the label of a previous dump file for an incremental dump.

[-n]

This specifies that if the source VFS is a read-write VFS, the SpinServer does not first create a SpinShot of the source VFS.

[-c]

This specifies that a clone is created on the client before a dump of a read-write VFS is created.

[-t timeout_value]

This specifies the connection timeout value, in seconds. The default is 3 seconds.

[-o [output_file]]

This specifies the location to which dump output is directed. By default, dump output goes to STDOUT. If the parameter is specified without an output_file name, the current dump's label is used as the name of the output file.

VFS_name

This specifies the name of the VFS whose contents are to be dumped.

Example

The following example creates a dump of a VFS named dept.eng from a SpinServer with the IP address 127.32.16.1 to an output file named /tmp/dept.eng.

# /sbin/vfsdump -s 127.32.16.1 -o /tmp/dept.eng dept.eng

vfsrestore

Name

vfsrestore -- Use the vfsrestore command to restore the contents of a VFS from a VFS dump.

Synopsis

/sbin/vfsrestore [-h] [-s spinserver] [-i input_file] [-f] [-t timeout_value] [-p storage_pool_name] [-v virtual_server_name] VFS_name

Description

The vfsrestore command restores the contents of a VFS from a VFS dump.

Options

[-h]

This displays help information for the command.

[-s spinserver]

This specifies the name or IP address of the SpinServer on which the restored VFS is to be located. The default value is 127.0.0.1.

[-i input_file]

This specifies the name of a file from which dump data is to be restored. By default, input is read from standard input (STDIN).

[-f]

This specifies that data is to be forcibly restored if the specified dump file is out of sequence.

[-t timeout_value]

This specifies the connection timeout value, in seconds. The default is 3 seconds.

[-p storage_pool_name]

This specifies the name of the storage pool on which the restored VFS is to be created. Specify this parameter and the -v parameter only if a new VFS needs to be created to hold the restored data.

[-v virtual_server_name]

This specifies the name of the virtual server on which the restored VFS is to be created. Specify this parameter and the -p parameter only if a new VFS needs to be created to hold the restored data.

VFS_name

This specifies the name of the VFS to which dump data is to be restroed. If necessary, this VFS is created by the command.

Example

The following example restores data to a SpinServer with the IP address 127.32.17.1 from a dump file /tmp/dept.eng:1:5000. Data is restored to a VFS named new.vfs, which is created on a storage pool named pool2 and a virtual server named vs2.

# /sbin/vfsrestore -s 127.32.17.1 -i /tmp/dept.eng:1:5000 -p pool2 -v vs2 new.vfs

Copyright © 2004 Network Appliance, Inc.; copyright © 2003, 2004 Spinnaker Networks, LLC. All rights reserved. Specifications subject to change without notice.